home *** CD-ROM | disk | FTP | other *** search
/ Collection of Internet / Collection of Internet.iso / infosrvr / dev / www_talk.930 / 000409_connolly@pixel.convex.com _Tue Dec 1 04:29:53 1992.msg < prev    next >
Internet Message Format  |  1994-01-24  |  4KB

  1. Return-Path: <connolly@pixel.convex.com>
  2. Received: from dxmint.cern.ch by  nxoc01.cern.ch  (NeXT-1.0 (From Sendmail 5.52)/NeXT-2.0)
  3.     id AA06221; Tue, 1 Dec 92 04:29:53 MET
  4. Received: by dxmint.cern.ch (5.65/DEC-Ultrix/4.3)
  5.     id AA26213; Tue, 1 Dec 1992 04:42:58 +0100
  6. Received: from pixel.convex.com by convex.convex.com (5.64/1.35)
  7.     id AA12672; Mon, 30 Nov 92 21:42:49 -0600
  8. Received: from localhost by pixel.convex.com (5.64/1.28)
  9.     id AA06729; Mon, 30 Nov 92 21:42:48 -0600
  10. Message-Id: <9212010342.AA06729@pixel.convex.com>
  11. To: "Tony Johnson (415) 926 2278" <TONYJ@scs.slac.stanford.edu>
  12. Cc: www-talk@nxoc01.cern.ch
  13. Subject: Re: quotes around tags and escape sequences 
  14. In-Reply-To: Your message of "Mon, 30 Nov 92 18:59:00 PDT."
  15.              <69FDBB0140801933@SCS.SLAC.STANFORD.EDU> 
  16. Date: Mon, 30 Nov 92 21:42:47 CST
  17. From: Dan Connolly <connolly@pixel.convex.com>
  18.  
  19.  
  20. >Three questions, 
  21. >
  22. >  1) If we now expect quotes around tags, are we still meant to understand % as
  23. >     an escape character within tags?
  24.  
  25. In short, I think so.
  26.  
  27. These dang things get parsed twice: once by the SGML parser, and once
  28. by the URL parser.
  29.  
  30. After the HREF=, the SGML parser is looking for an attribute value,
  31. which may be a token or a literal. The syntax of a URL conflicts with
  32. the syntax of a token, so you've got to use a literal, i.e. you've
  33. got to put quotes around it.
  34.  
  35. To compute the value of the HREF attribute, the SGML parser grabs
  36. everything between ""s (or ''s, actually. In fact, it expands
  37. &entity; references too!).
  38.  
  39. Then you hand the value of the HREF attribute to the URL parser.
  40. It better be a legal URL at this point. I don't know if the URL
  41. parsing code can handle spaces in a URL or not. If not, they've
  42. got to be represented by the %nn construct.
  43.  
  44. NOTE: There's an SGML construct: &#SPACE; or { designed for the same
  45. purpose. We might want to remove the quoting mechanism from the
  46. URL spec, and say that you use whatever quoting mechanisms the
  47. enclosing data format requires.
  48.  
  49.  
  50. >  2) Which of the following do I need to support, and which is the "approved"      
  51. >     method of accessing gopher?
  52. >
  53. >         href="gopher://gopher.micro.umn.edu:70/00/Some Stuff"
  54.  
  55. This is legal SGML -- dunno if it's a legal URL.
  56.  
  57. >         href="gopher://gopher.micro.umn.edu:70/00/Some%20Stuff"
  58.  
  59. This is probably your best bet for the current linemode code.
  60.  
  61. >         href=gopher://gopher.micro.umn.edu:70/00/Some%20Stuff
  62.  
  63. SGML parsers won't grok this.
  64.  
  65. For starters, you've got kind of a bad design for handling SGML
  66. attributes: you parse them twice: once to stick them in the param
  67. resource, and once to take them out of the param resource and stick
  68. them in the href and name resources.
  69.  
  70. Rather than a param resource, the parsing code should build an XtArglist
  71. with the attribute names and values. Then it can just call XtSetValues
  72. when it's done parsing the start tag. This would be a minor modification
  73. to my current version of the MidasWWW code using my HTML parsing library.
  74.  
  75. >  3) Is the % meant to act as an escape character in search strings? ie
  76. >
  77. >         href="http://slacvm.slac.stanford.edu/FIND/PARTICLE?PI%nn"
  78. >
  79. >     meant to find entries for PI+ ? (where nn is the ascii code for +).
  80.  
  81. Yeah... I've got a bunch of questions like this one. My understanding
  82. is that everything after the scheme: is defined by the individual scheme.
  83. It's not safe to just replace %nn by the corresponding ASCII character
  84. in all URLs. The %nn quoting mechanism is specific to the gopher scheme.
  85. (It might be used by other schemes too, but it's not a universal mechanism.)
  86.  
  87. I've got some design ideas for the WWW library that I think would obviate
  88. the need for implemntors like Tony to even mess with this stuff.
  89.  
  90. Details as the develop...
  91.  
  92. Tony: I'll send you my HTML parsing work separately.
  93.  
  94. Dan
  95.